package videojuegoalpha;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;

public class Obstacle {
    int positionX, positionY;
    Image image;
    ImageIcon plant=new ImageIcon("plant.png");
    boolean visible;//control para saber cuando destruir el objeto
    
    
    
    public Obstacle(int x,int y){
        this.positionX=x;
        this.positionY=y;       
        this.image=plant.getImage();
        visible=true;
    }
    
    // Getters y setters.

    public Image getImage() {
        return image;
    }

    public void setimages(BufferedImage image) {
        this.image = image;
    }

    public int getPositionX() {
        return positionX;
    }

    public void setPositionX(int positionX) {
        this.positionX = positionX;
    }

    public int getPositionY() {
        return positionY;
    }

    public void setPositionY(int positionY) {
        this.positionY = positionY;
    }
    
    // Métodos propios
    
    public Rectangle getBounds(){
        return new Rectangle(positionX,positionY,image.getWidth(null),image.getHeight(null));
    } 
}
